home *** CD-ROM | disk | FTP | other *** search
- Unit spx_snd;
-
- {$X+,O+ }
- { SPX Library Version 3.0 Copyright 1994 Scott D. Ramsay }
- { NOTE: Do not use this unit with SPX_TIM.TPU }
-
- Interface
-
- Uses crt,dos,spx_ems,spx_fnc;
-
- type
- Psound = ^Tsound;
- Tsound = object
- sblk : pointer;
- size,
- sport : word;
- sb_play : boolean;
- constructor init(sndfile:string;prt:word;_sb:boolean);
- function loadsnd(sndfile:string;prt:word;_sb:boolean):boolean; virtual;
- function filesnd(var fil:file;bsize,prt:word;_sb:boolean):boolean; virtual;
- procedure cleansnd; virtual;
- procedure play(canstop:boolean); virtual;
- procedure stop; virtual;
- destructor done; virtual;
- end;
- PEmsSound = ^TEmsSound;
- TEmsSound = object(Tsound)
- EMSseg,handle : word;
- EMSok : boolean;
- constructor init(sndfile:string;prt:word;_sb:boolean);
- function loadsnd(sndfile:string;prt:word;_sb:boolean):boolean; virtual;
- procedure cleansnd; virtual;
- procedure play(canstop:boolean); virtual;
- destructor done; virtual;
- end;
- UserProc = procedure;
-
- var
- cs,playing : boolean;
- f_clk,s_clk : array[0..3] of word;
- rate,cntime : word;
- f_userclk,
- s_userclk : userproc;
-
- function SBFindBase:word;
- function SBReset(BaseAddr : word) : boolean;
- procedure globalstop;
- {$IFDEF MSDOS } { Does not work in protected/windows mode }
- procedure setrate(cycles:word);
- {$ENDIF }
- procedure wait(seconds,which:integer);
-